package com.ruoyi.wbs.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.wbs.mapper.ProjectActivityMapper;
import com.ruoyi.wbs.domain.ProjectActivity;
import com.ruoyi.wbs.service.IProjectActivityService;

/**
 * 项目活动Service业务层处理
 * 
 * @author renyuxin
 * @date 2024-06-11
 */
@Service
public class ProjectActivityServiceImpl implements IProjectActivityService
{
    @Autowired
    private ProjectActivityMapper projectActivityMapper;

    /**
     * 查询项目活动
     * 
     * @param avtivityId 项目活动主键
     * @return 项目活动
     */
    @Override
    public ProjectActivity selectProjectActivityByAvtivityId(Long avtivityId)
    {
        return projectActivityMapper.selectProjectActivityByAvtivityId(avtivityId);
    }

    /**
     * 查询项目活动列表
     * 
     * @param projectActivity 项目活动
     * @return 项目活动
     */
    @Override
    public List<ProjectActivity> selectProjectActivityList(ProjectActivity projectActivity)
    {
        return projectActivityMapper.selectProjectActivityList(projectActivity);
    }

    /**
     * 新增项目活动
     * 
     * @param projectActivity 项目活动
     * @return 结果
     */
    @Override
    public int insertProjectActivity(ProjectActivity projectActivity)
    {
        return projectActivityMapper.insertProjectActivity(projectActivity);
    }

    /**
     * 修改项目活动
     * 
     * @param projectActivity 项目活动
     * @return 结果
     */
    @Override
    public int updateProjectActivity(ProjectActivity projectActivity)
    {
        return projectActivityMapper.updateProjectActivity(projectActivity);
    }

    /**
     * 批量删除项目活动
     * 
     * @param avtivityIds 需要删除的项目活动主键
     * @return 结果
     */
    @Override
    public int deleteProjectActivityByAvtivityIds(Long[] avtivityIds)
    {
        return projectActivityMapper.deleteProjectActivityByAvtivityIds(avtivityIds);
    }

    /**
     * 删除项目活动信息
     * 
     * @param avtivityId 项目活动主键
     * @return 结果
     */
    @Override
    public int deleteProjectActivityByAvtivityId(Long avtivityId)
    {
        return projectActivityMapper.deleteProjectActivityByAvtivityId(avtivityId);
    }

    @Override
    public List<ProjectActivity> selectActByProjectId(Long projectId) {
        return projectActivityMapper.selectActByProjectId(projectId);
    }
}
